<template>
  <div class="static-container-header"
       :class="[
       size ? `static-container-header--${size}` : '',
       {
       'is-border': border,
       }
       ]"
  >
    <h5 class="static-container-header__title">
      <div class="static-container-header__left">
        <slot></slot>
        <div class="static-container-header__sub-title">
          <slot name="sub-title"></slot>
        </div>
      </div>
      <div class="static-container-header__right">
        <slot name="right"></slot>
      </div>
    </h5>
  </div>
</template>

<script>
  export default {
    name: "static-container-header",

    props: {
      size: String,
      border: {
        type: Boolean,
        default: true,
      }
    }
  };
</script>

<style lang="scss">
  $--title-size:28px;

  @include b (static-container-header) {
    margin-bottom:30px;

    @include e(title) {
      color:$--color-black;
      font-size:$--title-size;
      padding-bottom: 20px;
      font-weight:bold;
      margin-bottom: 30px;
      display: flex;
      justify-content: center;
    }

    @include e(left) {
      flex: 1 0 0;
    }

    @include e(sub-title) {
      font-size: $--font-size-x-large;
      color: $--color-black-5;
    }

    @include when(border) {
      border-bottom: 1px solid $--border-color-base-1;
    }

    @include m(small) {
      @include e(title) {
        font-size: 18px;
        margin-bottom: 20px;
      }
    }
  }
</style>